// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:31


// Source File Name:   v1.java

package com.zelix;

import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.*;

public class v1 extends JComboBox
        implements ItemListener, PropertyChangeListener, pz {

    private File a[];
    private File b;
    private ArrayList c;
    private DefaultComboBoxModel d;
    boolean e;
    private static String z[];

    public v1(File file) {
        a();
        a(file);
        addItemListener(this);
    }

    void a() {
        int i;
        a = File.listRoots();
        d = new DefaultComboBoxModel();
        setModel(d);
        i = 0;
        for (; i < a.length; i++) {
            d.addElement(a[i]);
        }

        setRenderer(new r1(this));
        setToolTipText(z[1]);

    }

    public void itemStateChanged(ItemEvent itemevent) {
            if (itemevent.getStateChange() != 1 || e){
            }else{
            File file = (File) getSelectedItem();
            if (file.exists()) {
                b = file;
                firePropertyChange(z[0], null, file);
            }else{
                e = true;
                setSelectedItem(b);
                e = false;
            }
        }
    }

    public void propertyChange(PropertyChangeEvent propertychangeevent) {
        if (propertychangeevent.getPropertyName().equals(z[0])) {
            e = true;
            a((File) propertychangeevent.getNewValue());
            e = false;
        }
    }

    public void a(File file) {
        File file1;
        b = file;
        c = new ArrayList();
        do {
            file1 = b.getParentFile();
            if (file1 == null) {
                break;
            }
            c.add(file1);
        } while (true);


        File file2;
        DefaultComboBoxModel defaultcomboboxmodel;
        int i;
        Collections.reverse(c);
        file2 = null;
        if (c.size() > 0)
            file2 = (File) c.get(0);
        defaultcomboboxmodel = new DefaultComboBoxModel();
        i = 0;
        for (; i < a.length; i++) {
            int j;
            defaultcomboboxmodel.addElement(a[i]);
            if (file2 == null || !file2.equals(a[i]))
                continue;
            for (j = 1; j < c.size(); j++) {
                defaultcomboboxmodel.addElement(c.get(j));
            }
            defaultcomboboxmodel.addElement(b);
        }

        d = defaultcomboboxmodel;
        setModel(d);
        setSelectedItem(b);
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x70;
                    break;
                case 1:
                    key = 104;
                    break;
                case 2:
                    key = 108;
                    break;
                case 3:
                    key = 19;
                    break;
                default:
                    key = 59;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[2];
        as[0] = z("\024\001\036vX\004\007\036jx\030\t\002t^\024".toCharArray());
        as[1] = z("3\035\036a^\036\034LuT\034\f\ta\033\022\r\005}\\P\004\005`O\025\f".toCharArray());
        z = as;

    }
}